package com.ruoyi.shop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.ShopMapper;
import com.ruoyi.shop.domain.Shop;
import com.ruoyi.shop.service.IShopService;

/**
 * 店铺管理Service业务层处理
 *
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class ShopServiceImpl implements IShopService {
    @Autowired
    private ShopMapper shopMapper;

    /**
     * 查询店铺管理
     *
     * @param id 店铺管理主键
     * @return 店铺管理
     */
    @Override
    public Shop selectShopById(Long id) {
        return shopMapper.selectShopById(id);
    }

    /**
     * 查询店铺管理列表
     *
     * @param shop 店铺管理
     * @return 店铺管理
     */
    @Override
    public List<Shop> selectShopList(Shop shop) {
        return shopMapper.selectShopList(shop);
    }

    /**
     * 新增店铺管理
     *
     * @param shop 店铺管理
     * @return 结果
     */
    @Override
    public int insertShop(Shop shop) {
        return shopMapper.insertShop(shop);
    }

    /**
     * 修改店铺管理
     *
     * @param shop 店铺管理
     * @return 结果
     */
    @Override
    public int updateShop(Shop shop) {
        return shopMapper.updateShop(shop);
    }

    /**
     * 批量删除店铺管理
     *
     * @param ids 需要删除的店铺管理主键
     * @return 结果
     */
    @Override
    public int deleteShopByIds(Long[] ids) {
        return shopMapper.deleteShopByIds(ids);
    }

    /**
     * 删除店铺管理信息
     *
     * @param id 店铺管理主键
     * @return 结果
     */
    @Override
    public int deleteShopById(Long id) {
        return shopMapper.deleteShopById(id);
    }

    @Override
    public int alertShopByIds(Long[] ids) {
        return shopMapper.alertShopByIds(ids);
    }

    @Override
    public Shop getShopByUid(Long uid) {
        return shopMapper.getShopByUid(uid);
    }
}
